const express = require("express")
const app = express()
const list = require('../service/user/list')

// 查询用户的订单
app.get("/getlistAll",async(req,res)=>{
    // console.log(req.query)
    let result = await list.getUserlistAll(req.query.userId)
    // console.log(result);
    res.send(result)
})
app.get("/getlist",async(req,res)=>{
// <<<<<<< HEAD
//     // console.log(req.query)
//     let result = await list.getUserlist(req.query.userId,req.query.status)
//     // console.log(result);
// =======
    console.log(req.query)
    let result = await list.getUserlist()
    console.log(result);

    res.send(result)
})
  


app.get("/addlist",async(req,res)=>{
    console.log(req.query)
    let result = await list.addUserList(req.query.userId,req.query.goodsId,req.query.status)
    // console.log(result);
    res.send(result) 
})
app.get("/getlistaddress",async(req,res)=>{
    console.log(req.query)
    let result = await list.getaddress(req.query.userId)
    // console.log(result);
    res.send(result) 
})
module.exports = app;

